﻿using System.ComponentModel;
using System.Windows.Media.Imaging;
using LaserTag.Infrastructure.ViewModels;
using LaserTag.Module.MediaKit.Views;

namespace LaserTag.Module.MediaKit.ViewModels
{
    public class VideoCaptureViewModel : ViewModelBase, IVideoCaptureViewModel
    {
        private int m_desiredPixelHeight;
        private int m_desiredPixelWidth;
        private int m_fps;

        private readonly IVideoCaptureView m_view;

        public VideoCaptureViewModel(IVideoCaptureView view)
        {
            m_view = view;
            DesiredPixelHeight = 240;
            DesiredPixelWidth = 320;
            Fps = 30;

            m_view.SetViewModel(this);
        }

        public IVideoCaptureView View
        {
            get
            {
                return m_view;
            }
        }

        public int Fps
        {
            get
            {
                return m_fps;
            }
            set
            {
                InvokePropertyChanged("Fps");
            }
        }

        public int DesiredPixelWidth
        {
            get { return m_desiredPixelWidth; }
            set
            {
                m_desiredPixelWidth = value;
                InvokePropertyChanged("DesiredPixelWidth");
            }
        }

        public int DesiredPixelHeight
        {
            get { return m_desiredPixelHeight; }
            set
            {
                m_desiredPixelHeight = value;
                InvokePropertyChanged("DesiredPixelHeight");
            }
        }
    }
}
